import $axios from './request';
// 获取供应商列表
export const orderSupplier = (data) => {
    return $axios.post('ordersConfig/company', data)
}
// 获取银行列表
export const orderPayment = (data) => {
    return $axios.post('ordersConfig/payment', data)
}
// 获取产品列表
export const orderModel = (data) => {
    return $axios.post('ordersConfig/model', data)
}

// 获取品牌列表
export const orderBrand = (data) => {
    return $axios.post('ordersConfig/brand', data)
}
// 获取交期列表
export const orderLeading = (data) => {
    return $axios.post('ordersConfig/leading', data)
}
// 获取货况列表
export const orderCondition = (data) => {
    return $axios.post('ordersConfig/condition', data)
}
// 获取采购列表
export const ordersConfigGetUser = (data) => {
    return $axios.post('ordersConfig/getUser',data)
}

// 获取用户和供应商
export const orderUser = (data) => {
    return $axios.post('ordersConfig/getCustomer', data)
}
// 创建订单
export const ordersAdd = (data) => {
    return $axios.post('orders/add', data)
}
//  订单列表
export const orderList = (data) => {
    return $axios.post('orders/list', data)
}
// 订单详情
export const orderDetail = (data) => {
    return $axios.post('orders/item', data)
}
// 订单编辑
export const orderEdit = (data) => {
    return $axios.post('orders/edit', data)
}
// 订单删除
export const orderDelete = (data) => {
    return $axios.post('orders/delete', data)
}

// 订单产品删除
export const orderProductDelete = (data) => {
    return $axios.post('orders/deleteItem', data)
}



// 获取订单ID列表
export const oederidList = (data) => {
    return $axios.post('ordersConfig/getOrders', data)
}

// copy to order
export const copyOrder = (data) => {
    return $axios.post('orders/copyOrder', data)
}

// copy to order 保存
export const orderSaveCopyToOrder = (data) => {
    return $axios.post('orders/saveCopyToOrder', data)
}


// from rfq 
export const orderFromRfq = (data) => {
    return $axios.post('orders/rfq', data)
}

// 保存 from rfq
export const orderFromRfqSave = (data) => {
    return $axios.post('orders/doOrder', data)
}

//from qtn
export const orderFromQtn = (data) => {
    return $axios.post('orders/quotation', data)
}

// 获取clearance
export const orderClearance = (data) => {
    return $axios.post('orders/clearance', data)
}
// 创建采购任务
export const purchaseOrderteskAdd = (data) => {
    return $axios.post('purchaseOrdertesk/add',data)
}
// 获取已采购数据
export const ordersPurchaseTesk = (data) => {
    return $axios.post('orders/purchaseTesk',data)
}
// 保存清关信息
export const orderClearanceSave = (data) => {
    return $axios.post('orders/clearance', data)
}

// 获取产品价格曲线数据
export const ordersProductRecord = (data) => {
    return $axios.post('orders/productRecord', data)
}

// 获取订单小计
export const ordersServiceCharge = (data) => {
    return $axios.post('orders/serviceCharge', data)
}

// 获取发票数据
export const ordersClearanceData = (data) => {
    return $axios.post('orders/clearanceData', data)
}



// 获取采购任务列表
export const purchaseOrderTakeList = (data) => {
    return $axios.post('purchaseOrdertesk/list', data)
}
// 获取采购任务详情
export const purchaseOrderteskDetail = (data) => {
    return $axios.post('purchaseOrdertesk/detailed', data)
}
//调配采购任务
export const  purchaseOrderteskReassign = (data) => {
    return $axios.post('purchaseOrdertesk/reassign',data)
}
// 退回采购任务
export const purchaseOrderteskCallbackOrder = (data) => {
    return $axios.post('purchaseOrdertesk/callbackOrder',data)
}
// 删除采购任务
export const purchaseOrderteskDelete = (data) => {
    return $axios.post('purchaseOrdertesk/delete',data)
}



//创建采购订单
export const purchaseOrderAdd = (data) => {
    return $axios.post('purchaseOrder/add',data)
}
// 获取采购订单列表
export const purchaseOrderList = (data) => {
    return $axios.post('purchaseOrder/list', data)
}
// 获取采购订单详情
export const purchaseOrderDetailed = (data) => {
    return $axios.post('purchaseOrder/detailed',data)
}
